package org.qs.webservice.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.ws.rs.FormParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.core.MediaType;

import org.qs.webservice.exception.QSReadException;
import org.qs.webservice.service.BookMarkService;
import org.qs.webservice.service.QSConfigService;
import org.qs.webservice.util.IReadUtils;
import org.springframework.stereotype.Component;

/**
 * 评论接口
 * @author xusaike
 *
 */
@Component
@Path("/v{version}/config")
public class QSConfigRestController {
	
	@Resource
	private QSConfigService qsConfigService;

	@GET
    @Path("/vip")
	public String getVip(
		){
		try {
			String rt = qsConfigService.getVipConfig();
			return rt;
		} catch (Exception e) {
			Map<String,Object> errorJson = new HashMap<String,Object>();
			QSReadException.printf(e, "添加评论异常",errorJson);
			Map<String,Object> tokenMap =  new HashMap<String,Object>();
			tokenMap.put("code", 403);
			tokenMap.put("reason","服务器错误");
			return IReadUtils.beanToJson(tokenMap);
		}
	}
	
}
